package com.medvalley.tcm.dao;

import com.medvalley.tcm.domain.SickAndUser;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface SickUserDao extends CrudRepository<SickAndUser, Long> {

    List<SickAndUser> findAllByUserId(long userId);

    List<SickAndUser> findAllBySickId(long sickId);

    SickAndUser findOneBySickIdAndUserId(long sickId, long userId);

    SickAndUser findOneBySickIdAndPhone(long sickId, String phone);


}
